﻿#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

typedef double Real;
 
typedef struct 
{
	Real salary;
	Real year;
	Real rate;
}Context;

Context context;
 

void read_data(Context* ctx)
{
	scanf("%lf", &ctx->salary);
}

Real tax1(Real salary)
{
	//salary = 1600;
	if (salary <= 1600)
		return 0;
	else if (salary <= 2500)
		return (salary - 1600) * 0.05;
	else if (salary <= 3500)
		return (salary - 1600) * 0.1 - (2500 - 1600) * 0.05;
	else if (salary <= 4500)
		return (salary - 1600) * 0.15 - (3500 - 2500) * 0.05 - (2500 - 1600) * 0.1;
	else
		return (salary - 1600) * 0.2 - (4500 - 3500) * 0.05 - (3500 - 2500) * 0.1 - (2500 - 1600) * 0.15;
}

Real tax(Real salary)
{
	//salary = 1600;
	if (salary <= 1600)
		return 0;
	else if (salary <= 2500)
		return (salary - 1600) * 0.05;
	else if (salary <= 3500)
		return (salary - 1600) * 0.1;
	else if (salary <= 4500)
		return (salary - 1600) * 0.15;
	else
		return (salary - 1600) * 0.2;
}

void do_task(Context* ctx)
{
	printf("%.2f\n", tax(ctx->salary));
}

void solve(Context* ctx)
{
	read_data(ctx);
	do_task(ctx);
}

int main()
{
	//freopen("D:/Develop/GitRepos/MOOC/浙江大学/数据结构/201906/DataStructure/M2019秋C入门和进阶练习集/7-152.txt", "r", stdin);
	solve(&context);
	return 0;
}
